package com.guo.bootvue;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.beans.factory.config.BeanFactoryPostProcessor;
import org.springframework.beans.factory.support.DefaultListableBeanFactory;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;

@MapperScan("com.guo.bootvue.mapper")
@ComponentScan(basePackages = {"com.guo"})
@SpringBootApplication
public class BootvueApplication {

	public static void main(String[] args) {
		SpringApplication.run(BootvueApplication.class, args);
	}

	@Bean
	public static BeanFactoryPostProcessor removeTomcatWebServerCustomizer(){
		return (beanFactory) ->
				((DefaultListableBeanFactory)beanFactory).removeBeanDefinition("tomcatWebServerFactoryCustomizer");
	}

}
